package com.yanqu.road.logic.bussiness.player;

import com.yanqu.road.entity.decoration.*;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;


public class UserMammonBussiness {

    public static UserMammon getUserMammon(long userId) {
        return DaoHelper.getUserMammonDaoImpl().getUserMammon(userId);
    }

    public static boolean addUserMammon(UserMammon userMammon) {
        return DaoHelper.getUserMammonDaoImpl().add(userMammon);
    }

    public static boolean updateUserMammon(UserMammon userMammon) {
        return DaoHelper.getUserMammonDaoImpl().update(userMammon);
    }

    public static Map<Integer, LinkedList<MammonRecord>> getMammonRecordMap(int maxCount){
        return DaoHelper.getMammonRecordDaoImpl().getMammonRecordMap(maxCount);
    }

    public static boolean addMammonRecord(MammonRecord mammonRecord){
        return DaoHelper.getMammonRecordDaoImpl().add(mammonRecord);
    }

    public static boolean updateMammonRecord(MammonRecord mammonRecord){
        return DaoHelper.getMammonRecordDaoImpl().update(mammonRecord);
    }

    public static Map<Long, UserMammonOfflineAdd> getUserMammonOfflineAdd(){
        return DaoHelper.getUserMammonOfflineAddDaoImpl().getUserMammonOfflineAdd();
    }

    public static boolean addUserMammonOfflineAdd(UserMammonOfflineAdd mammonOfflineAdd){
        return DaoHelper.getUserMammonOfflineAddDaoImpl().add(mammonOfflineAdd);
    }

    public static boolean updateUserMammonOfflineAdd(UserMammonOfflineAdd mammonOfflineAdd){
        return DaoHelper.getUserMammonOfflineAddDaoImpl().update(mammonOfflineAdd);
    }

    public static Map<String, UserMammonCongratulate> getUserMammonCongratulateMap(long userId) {
        return DaoHelper.getUserMammonCongratulateDaoImpl().getUserMammonCongratulateMap(userId);
    }

    public static boolean addUserMammonCongratulate(UserMammonCongratulate userMammonCongratulate){
        return DaoHelper.getUserMammonCongratulateDaoImpl().add(userMammonCongratulate);
    }

    public static Map<Integer, UserMammonDecoration> getMammonDecoration(long userId){
        return DaoHelper.getUserMammonDecorationDaoImpl().getUserMammonDecoration(userId);
    }

    public static boolean addUserMammonDecoration(UserMammonDecoration userMammonDecoration){
        return DaoHelper.getUserMammonDecorationDaoImpl().add(userMammonDecoration);
    }

    public static boolean updateUserMammonDecoration(UserMammonDecoration userMammonDecoration){
        return DaoHelper.getUserMammonDecorationDaoImpl().update(userMammonDecoration);
    }

    public static int getUserHistoryMammonDecoration(long userId, List<Integer> list, Date date){
        return DaoHelper.getUserMammonHistoryDaoImpl().getUserMammonHistoryDecoration(userId,list,date);
    }
}
